﻿@model N03_11HCA_HTTTHD.Models.Kho_DanhSachRaoVat

@{
    ViewBag.Title = "Danh sách rao vặt trong kho";
    Layout = "~/Views/Shared/_LayoutKho.cshtml";
}

@section JavaScriptCSSImport{
    <link href="@Url.Content("~/Content/mycontent/list_counter.css")" rel="stylesheet" type="text/css" />
}

 @section JavaScriptDocumentReady{
    $(".btCapNhat").click(function(){
        window.location.href = '/Kho/CapNhatRaoVat/'+$(this).attr("accesskey");
    });

    $(".btXoa").click(function(){
        window.location.href = '/Kho/XoaRaoVat/'+$(this).attr("accesskey");
    });
 }
<h2>Danh sách rao vặt trong kho</h2>

<ul class="counter" id="ulCounter">
    <!-- -->
    @for (int i = 0; i < Model.ListRaoVat.Count; i++)
    {
        Data_DAO_DTO_Lib.DTO.RAOVAT_DTO cb = Model.ListRaoVat[i];
        
         <li @if (i%2 == 0){@Html.Raw("class='shadow_item'")}>
                <h3>
                    <a href="/RaoVat/ChiTiet/@cb.ID">@cb.ChuDe</a></h3>
                <p class="autohide chaobanpreview">@cb.NoiDung</p>
                <p>
                     <input type="button"  accesskey="@cb.ID" class="btCapNhat" value="Cập nhật"/><input class="btXoa" type="button" accesskey="@cb.ID" value="Xoá" />
                </p>
            </li>
    }
</ul>